package kr.hkit.powerjava.chapter09;


class Point{
	private int x;
	private int y;
	
	
	public Point(int x,int y){
		this.x=x;
		this.y=y;
	}


	public int getX() {
		return x;
	}


	public void setX(int x) {
		this.x = x;
	}


	public int getY() {
		return y;
	}


	public void setY(int y) {
		this.y = y;
	}


	@Override
	public String toString() {
		return "[x=" + x + ", y=" + y + "]";
	}
		
	
	
		
	}
public class Circle {
	
	private Point center;
	private int radius;
	
	Circle(Point p,int radius){
		this.center=p;
		this.radius=radius;
	}
	
	
	public Circle() {
		// TODO Auto-generated constructor stub
	}


	public Point getCenter() {
		return center;
	}


	public void setCenter(Point center) {
		this.center = center;
	}


	public int getRadius() {
		return radius;
	}


	public void setRadius(int radius) {
		this.radius = radius;
	}
	
	
	


	@Override
	public String toString() {
		return "Circle [center=" + center + ", radius=" + radius + "]";
	}


	public static void main(String[] args) {
		Point p = new Point(25, 78);
		Circle c= new Circle(p,10);
		
		p.setX(50);
		p.setY(100);
		c.setRadius(15);
		
		System.out.println(c);
		
		c.setRadius(30);
		
		Point p1=c.getCenter();
		p1.setX(100);
		p1.setY(200);
		
		System.out.println(c);

	}

}
